<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@include file = "/common/header.jsp" %>
<title>水电费</title>
 <link href="css/form.css" rel="stylesheet">
     <div class="container theme-showcase" role="main">
 <div class="jumbotron" role="main">
  <div class="page-header">
        <h1>水电费记录</h1>
      </div>
 <table class="table">
            <thead>
              <tr>
                <th>月份</th>
                <th>宿舍号</th>
                <th>金额</th>
                <th>状态</th>
                <c:if test="${student.stuID=='admin'}">
                <th>操作</th>
                </c:if>
              </tr>
            </thead>
            <tbody>
         <c:forEach items="${list}" var="fee">
			<tr>
				<td>${fee.month}</td>
				<td>${fee.dormID}</td>
				<td>${fee.money}</td>
				<c:if test="${fee.state eq 1}">
				<td style="color:green"> <c:out value="已交费" /></td>
				</c:if>
				<c:if test="${fee.state eq 0}">
				<td> <c:out value="未交费"/></td>
				</c:if>
				<c:if test="${student.stuID=='admin'}">
				<td>
				<c:if test="${fee.state eq 0}">
				<a href="FeeServlet?act=edit&feeID=${fee.feeID}"><c:out value="修改 "/></a>
				</c:if>
				<a href="FeeServlet?act=delete&feeID=${fee.feeID}" onclick="javascript:return checkDel()"><c:out value=" 删除"/></a>
				</td>
				</c:if>
			</tr>
		</c:forEach>
              
            </tbody>
          </table>
          
        <nav>
  <ul class="pagination">
    <li class="disabled"><a href="#" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>
    <li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
    <li><a href="#">2</a></li>
    <li><a href="#">3</a></li>
    <li><a href="#">4</a></li>
    <li><a href="#">5</a></li>
    <li>
      <a href="#" aria-label="Next">
        <span aria-hidden="true">&raquo;</span>
      </a>
    </li>
  </ul>
</nav>
          <c:if test="${student.stuID=='admin'}">
          <div class="panel panel-danger">
            <div class="panel-heading">
              <h3 class="panel-title">录入水电费</h3>
            </div>
            <div class="panel-body">
             <a href="addFee.jsp"><button type="button" class="btn btn-xs btn-link" >入口</button></a>
            </div>
          </div>
          </c:if>
   </div>
  </div>
   
  
<%@include file = "/common/footer.jsp" %>